import {createWebHashHistory, createRouter} from "vue-router";

const routes = [
    {
        path: '/',
        redirect: '/ds'
    },
    {
        path: '/login',
        name: 'Login',
        component: () => import('../Login.vue')
    },
    {
        path: '/ds',
        component: () => import('../Layout.vue'),
        redirect: '/ds/user',
        children: [
            {
                path: '/ds/user',
                name: 'UserList',
                component: () => import('../views/user/index.vue'),
            },
            {
                path: '/ds/record',
                name: 'RecordList',
                component: () => import('../views/record/index.vue'),
            },
            {
                path: '/ds/log',
                name: 'OperateLog',
                component: () => import('../views/log/index.vue'),
            },
            {
                path: '/ds/chat',
                name: 'Chat',
                component: () => import('../views/chat/index.vue'),
            },
            {
                path: '/ds/app',
                name: 'App',
                component: () => import('../views/app/index.vue'),
            },
        ]
    },
]
const router = createRouter({
    history: createWebHashHistory(),
    routes,
})
export default router
